import { useLocation, useParams, useSearchParams } from "react-router-dom";

function Page1() {
  const [params, setParams] = useSearchParams();
  const LocationRes = useLocation();
  console.log(params, LocationRes);
  const result = params.get("name");
  return (
    <div>
      <h1>
        page1——————{result}----{params.values()}
      </h1>
    </div>
  );
}
export default Page1;
